//路由模块
//导入koa-router
const router = require("koa-router")();
// 导入controllers目录下的index.js
const controllers = require("../controllers")
//设置路由，访问首页的时候
router.get("/",controllers.index);
router.post("/doLogin",controllers.doLogin);
router.get("/login",controllers.login);
router.post("/doRegister",controllers.doRegister);
router.get("/register",controllers.register);
router.get("/user",controllers.user);
router.get("/doDelete",controllers.doDelete);
router.get("/add",controllers.add);
router.post("/doAdd",controllers.doAdd);
router.get("/edit",controllers.edit);
router.post("/doEdit",controllers.doEdit);
//到处router
module.exports = router;